const mysql = require('mysql2')
const db = mysql.createConnection({
    host: '127.0.0.1', //172.83.124.144 服务器的ip
    user: 'root',
    password: '',
    database: 'file_db', // 服务器是http
});
db.query('select 1', (err, results) => {
  if (err) return console.log(err.message)
  console.log('数据库连接成功')
})

module.exports = db
